const mongoose = require('mongoose')
const { Schema, model } = mongoose

const userSchema = new Schema({
  // 用户名
  'username': {type: String},
  // 密码
  'password': {type: String},
  // 手机
  'isAdmin': {type: String, default:'0'},
  // 时间
  'created': {type: Date}
}, {versionKey: false})
UserModel = model('User', userSchema)

// 3. 向外暴露
module.exports = UserModel

